import uvicorn
from app import FastSkeletonApp
from conf.config import Config
from template.api import init_routes


server_name = "template"

app = FastSkeletonApp(
    init_routes,
    title=Config.env[server_name].title or "Api接口"
).app


def start():
    uvicorn.run(
        app=app,
        host=Config.env[server_name].host,
        port=Config.env[server_name].port,
        reload=False,
        access_log=False,
    )


if __name__ == '__main__':
    start()
